package com.xujinchen.method;

public class Demo02 {
    public static void main(String[] args) {
        int max = max(20,20);
        System.out.println(max);

    }
    public static int max(int num1,int num2){
        int result =num2;
        if(num1>num2){
            result =num1;
        }else if (num1==num2){
            System.out.println("num1==num2");
            return 0;//终止方法
        }
        return result;
    }
}
